gl: Fix glyph cache aging
authorMatthias Clasen <mclasen@redhat.com>
Sun, 2 Jun 2019 20:55:34 +0000 (20:55 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 3 Jun 2019 02:09:04 +0000 (02:09 +0000)
commite0803f039fe44ef3d09f1d701142800c071abea4
tree8f383262cf6b4225485984cc16610f07cd14dd48
parent3059d76b4ced4dc7dd52d7d20d5406308d8923ca
gl: Fix glyph cache aging

The logic here seems faulty. We want to keep
a timestamp that tells us when the glyph was
last used, so always update the timestamp.

And whenever we use a glyph, it turns 'young'
again, so remove it from the old pixels
accounting.

The (MAX_AGE, MAX_AGE+CHECK_INTERVAL) interval
is only relevant to prevent us from turning
a cached glyph old more than once, and that
is already taken care of.
gsk/gl/gskglglyphcache.c